package com.szc.demo01.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.szc.demo01.pojo.dto.UserDto;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Author: ShiZhiCheng
 * @Date: 2021/01/12 15:17:54
 */
@TableName("emp")
@Data
@NoArgsConstructor
public class Emp {
    @TableId(value = "id")
    private long id;
    private String ename;
    private long mgr;
    private Date hiredate;
    private double sal;
    private double comm;
    private long deptno;
    private String authoritys;

    public Emp(UserDto userDto){
        this.id = userDto.getId();
        this.ename = userDto.getEname();
        this.mgr = userDto.getMgr();
        this.hiredate = userDto.getHiredate();
        this.sal = userDto.getSal();
        this.comm = userDto.getComm();
        this.deptno = userDto.getDeptno();
        this.authoritys = userDto.getAuthoritys();
    }
}
